﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using PresentationLayer.Reports;

namespace PresentationLayer.View
{
    public partial class Report_DeptConsumption : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
        }
        protected void btnSubmit_Click(object sender, EventArgs e)
        {

            int m1 = Int32.Parse(DropDownList1.SelectedValue);


            DS_DeptConsumption ds = new DS_DeptConsumption();
            PresentationLayer.Reports.DS_DeptConsumptionTableAdapters.ConsumptionTableAdapter ta = new PresentationLayer.Reports.DS_DeptConsumptionTableAdapters.ConsumptionTableAdapter();

            ta.Fill(ds.Consumption, m);
            Report_DeptConsumption rep = new Report_DeptConsumption();


            rep.SetDataSource(ds);
            CrystalReportViewer1.ReportSource = rep;
        }
    }
}